package cn.oop.callback;

public class PaintFrame {
    public static void drawframe(MyFrame f) {
        System.out.println("启动线程");
        System.out.println("增加循环");
        System.out.println("查看消息栈");
        f.paint();
        System.out.println("启动缓存,增加效率");
    }

    public static void main(String[] args) {
        drawframe(new GameFrame());
    }
}

class GameFrame extends MyFrame {
    public void paint() {
        System.out.println("test.GameFrame");
    }
}
